xxx: isnanf() is some wtf
authorBenjamin Otte <otte@redhat.com>
Sun, 24 May 2020 22:07:07 +0000 (00:07 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 30 May 2020 23:30:14 +0000 (19:30 -0400)
gtk/fallback-c89.c

index a566e3423a4347402aa37de3a66681dad0272335..505d52e13a84e9136e0559cdfb8bb17d36874b46 100644 (file)
@@ -93,15 +93,27 @@ isnan (double x)
 #endif
 
 #ifndef HAVE_DECL_ISNANF
+#if 1
+#define isnanf(x) isnan(x)
+#else
 /* it seems of the supported compilers only
  * MSVC does not have isnanf(), but it does
  * have _isnanf() which does the same as isnanf()
  */
+#ifdef _MSC_VER
 static inline gboolean
 isnanf (float x)
 {
   return _isnanf (x);
 }
+#elif defined (__GNUC__)
+/* gcc has an intern function that it warns about when
+ * using -Wshadow but no header properly declares it,
+ * so we do it instead.
+ */
+extern int isnanf (float x);
+#endif
+#endif
 #endif
 
 #ifndef INFINITY